# list,tuple,set可以相互转换
# dict->list,tuple,set只会保留dict的key
# list,tuple,set->dict会报错
# 转换的方法：
# 使用内置类：list(iterable), tuple(iterable), set(iterable) and dict(iterable)


temp_list = [1, 1, 2, 3, 1, 6, 7, 8, 9, 5, 6, 7, 5, 7, 4]
temp_tuple = tuple(temp_list)
temp_set = set(temp_tuple)
print(temp_list, temp_tuple, temp_set, sep='\n')
# dict(temp_list)  # TypeError
dict_to_list = list({'name': 'lzy', 'age': 23, 'score': 'perfect'})
print(dict_to_list)

